import {createApp} from 'vue'
import {Lazyload} from 'vant';
import {ConfigProvider} from 'vant';

import App from './App.vue'
import 'vant/lib/index.css';
import router from "./router";
import {setupGuard} from "./router/guard";
import store, {setupStore} from "./store";
import asyncComponentsPlugin from "./asyncComponents";
import defaultImage from "./assets/images/default_avatar.jpg"

const app = createApp(App)
app.use(store)
app.use(router)
app.use(ConfigProvider);
app.use(asyncComponentsPlugin)
setupGuard()
setupStore()
// 懒加载配置
app.use(Lazyload, {
    lazyComponent: true,
    loading: defaultImage
});
app.mount('#app')
